Skip to content

ReactiveLayoutComponentBase class

Defined in

Namespace: ReactiveUI.Blazor Assembly: ReactiveUI.Blazor.dll Full name: ReactiveUI.Blazor.ReactiveLayoutComponentBase<T> Modifiers: public

Summary

        A base component for handling property changes and updating the Blazor view appropriately.
        

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1

Class hierarchy
classDiagram
class ReactiveLayoutComponentBase~T~
class LayoutComponentBase
LayoutComponentBase <|-- ReactiveLayoutComponentBase~T~
class IViewFor~T~ {
    <>
}
IViewFor~T~ <|.. ReactiveLayoutComponentBase~T~
class IViewFor {
    <>
}
IViewFor <|.. ReactiveLayoutComponentBase~T~
class IActivatableView {
    <>
}
IActivatableView <|.. ReactiveLayoutComponentBase~T~
class INotifyPropertyChanged {
    <>
}
INotifyPropertyChanged <|.. ReactiveLayoutComponentBase~T~
class ICanActivate {
    <>
}
ICanActivate <|.. ReactiveLayoutComponentBase~T~
class IDisposable {
    <>
}
IDisposable <|.. ReactiveLayoutComponentBase~T~

Inherits from: LayoutComponentBase

Implements: IViewFor, IViewFor, IActivatableView, INotifyPropertyChanged, ICanActivate, IDisposable

Remarks

This component supports ReactiveUI activation semantics and triggers StateHasChanged when either the view model instance changes or the current view model raises PropertyChanged.

Trimming/AOT: this type avoids expression-tree-based ReactiveUI helpers (e.g. WhenAnyValue) and uses event-based observables instead.

Constructors

NameSummary
.ctor

Properties

NameSummary
ViewModelGets or sets the strongly typed view model. Override this property to integrate with the platform's binding system.
ActivatedGets a observable which is triggered when the ViewModel is activated.
DeactivatedGets a observable which is triggered when the ViewModel is deactivated.

Methods

NameSummary
DisposeDisposes the component and releases managed resources.
OnInitializedMethod invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.
OnAfterRenderMethod invoked after each time the component has rendered interactively and the UI has finished updating (for example, after elements have been added to the browser DOM). Any...
OnPropertyChangedInvokes the property changed event.

Events

NameSummary
PropertyChanged
Inherited members